home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / Appearance.p < prev    next >
Text File  |  1996-05-01  |  6KB  |  174 lines

  1. {
  2.      File:        Appearance.p
  3.  
  4.      Contains:    Appearance Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Appearance;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __APPEARANCE__}
  28. {$SETC __APPEARANCE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC AppearanceIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __QUICKDRAW__}
  35. {$I Quickdraw.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45. {$IFC FOR_SYSTEM8_COOPERATIVE }
  46. {  Appearance Manager Error Codes (will move to Errors.i) -4200 through -4249  }
  47.  
  48. CONST
  49.     appearanceBadPatternIndexErr = -4201;                        {  pattern index invalid  }
  50.  
  51. {
  52.  * System Pattern (PixPat) Indices for GetThemePixPat and SetThemePen
  53. }
  54.     kThemeGrowIconBorderPattern    = 1;                            {  Windows  }
  55.     kThemeRootMenuBackgroundPattern = 2;                        {  Menus  }
  56.     kThemeSelectedRootMenuBackgroundPattern = 3;
  57.     kThemeDisabledRootMenuBackgroundPattern = 4;
  58.     kThemeMenuBackgroundPattern    = 5;
  59.     kThemeSelectedMenuBackgroundPattern = 6;
  60.     kThemeDisabledMenuBackgroundPattern = 7;
  61.     kThemeActivePushButtonBackgroundPattern = 8;                {  Controls  }
  62.     kThemePressedPushButtonBackgroundPattern = 9;
  63.     kThemeInactivePushButtonBackgroundPattern = 10;
  64.     kThemeActiveOffIconButtonBackgroundPattern = 11;
  65.     kThemeActiveOnIconButtonBackgroundPattern = 12;
  66.     kThemePressedOffIconButtonBackgroundPattern = 13;
  67.     kThemePressedOnIconButtonBackgroundPattern = 14;
  68.     kThemeMixedIconButtonBackgroundPattern = 15;
  69.     kThemeInactiveIconButtonBackgroundPattern = 16;
  70.     kThemeActivePopupButtonBackgroundPattern = 17;
  71.     kThemePressedPopupButtonBackgroundPattern = 18;
  72.     kThemeInactivePopupButtonBackgroundPattern = 19;
  73.     kThemeActiveDialogBackgroundPattern = 20;                    {  Dialogs  }
  74.     kThemeInactiveDialogBackgroundPattern = 21;
  75.     kThemeActiveAlertBackgroundPattern = 22;
  76.     kThemeInactiveAlertBackgroundPattern = 23;
  77.     kThemeActiveModelessDialogBackgroundPattern = 24;
  78.     kThemeInactiveModelessDialogBackgroundPattern = 25;
  79.     kThemeObjectFocusPattern    = 26;
  80.     kThemeActiveWindowHeaderBackgroundPattern = 27;                {  Primitives  }
  81.     kThemeInactiveWindowHeaderBackgroundPattern = 28;
  82.     kThemeFinderListViewSortColumnPattern = 29;                    {  Finder  }
  83.     kThemeFinderListViewBackgroundPattern = 30;
  84.     kThemeFinderListViewSeparatorLinePattern = 31;
  85.     kThemeFinderWindowBackgroundPattern = 32;
  86.     kThemeUtilityWindowBackgroundPattern = 33;                    {  Miscellaneous  }
  87.     kThemeStatusBarBackgroundPattern = 34;
  88.     kThemeInactiveStatusBarBackgroundPattern = 35;
  89.     kThemeDragHilitePattern        = 36;                            {  Drag Mgr  }
  90.  
  91. {
  92.  * System Text and other RGBColor Indices for GetThemeColor and SetThemeFore/BackColor.
  93. }
  94.     kThemeActiveDocumentWindowTitleColor = 1;                    {  Windows  }
  95.     kThemeInactiveDocumentWindowTitleColor = 2;
  96.     kThemeActiveMovableModalWindowTitleColor = 3;
  97.     kThemeInactiveMovableModalWindowTitleColor = 4;
  98.     kThemeActiveFloatingWindowTitleColor = 5;
  99.     kThemeInactiveFloatingWindowTitleColor = 6;
  100.     kThemeActiveDrawerWindowTitleColor = 7;
  101.     kThemeInactiveDrawerWindowTitleColor = 8;
  102.     kThemeRootMenuTextColor        = 9;                            {  Menus  }
  103.     kThemeSelectedRootMenuTextColor = 10;
  104.     kThemeDisabledRootMenuTextColor = 11;
  105.     kThemeMenuTextColor            = 12;
  106.     kThemeSelectedMenuTextColor    = 13;
  107.     kThemeDisabledMenuTextColor    = 14;
  108.     kThemeActivePushButtonTextColor = 15;                        {  Controls  }
  109.     kThemePressedPushButtonTextColor = 16;
  110.     kThemeInactivePushButtonTextColor = 17;
  111.     kThemeActivePopupLabelTextColor = 18;
  112.     kThemeInactivePopupLabelTextColor = 19;
  113.     kThemeActivePopupArrowColor    = 20;
  114.     kThemePressedPopupArrowColor = 21;
  115.     kThemeInactivePopupArrowColor = 22;
  116.     kThemeActiveDialogTextColor    = 23;                            {  Dialogs  }
  117.     kThemeInactiveDialogTextColor = 24;
  118.     kThemeActiveAlertTextColor    = 25;
  119.     kThemeInactiveAlertTextColor = 26;
  120.     kThemeActiveModelessDialogTextColor = 27;
  121.     kThemeInactiveModelessDialogTextColor = 28;
  122.     kThemeActiveWindowHeaderTextColor = 29;                        {  Primitives  }
  123.     kThemeInactiveWindowHeaderTextColor = 30;
  124.     kThemeIconLabelTextColor    = 31;                            {  Finder  }
  125.     kThemeIconLabelBackgroundColor = 32;
  126.     kThemeFinderListViewTextColor = 33;
  127.     kThemeAppleGuideCoachmarkColor = 34;                        {  Miscellaneous  }
  128.     kThemeChasingArrowsColor    = 35;
  129.     kThemeStatusBarTextColor    = 36;
  130.     kThemeInactiveStatusBarTextColor = 37;
  131.  
  132. {
  133.  *    System Appearance Information
  134. }
  135. {
  136.  System Patterns
  137.  *
  138.  * WARNING: Patterns returned by GetThemePixPat are shared by the system and other
  139.  * running applications.  These patterns are updated by the system automatically
  140.  * whenever the theme changes.  They are system-owned and must not be disposed.
  141.  * Never dispose a PixPatHandle obtained from GetThemePixPat or the system will crash.
  142. }
  143. FUNCTION GetThemePixPat(patternIndex: SInt16; VAR pixPat: PixPatHandle): OSStatus;
  144. FUNCTION SetThemePen(patternIndex: SInt16): OSStatus;
  145. {  System colors  }
  146. FUNCTION SetThemeForeColor(foreColorIndex: SInt16): OSStatus;
  147. FUNCTION SetThemeBackColor(backColorIndex: SInt16): OSStatus;
  148. FUNCTION GetThemeColor(colorIndex: SInt16; VAR color: RGBColor): OSStatus;
  149. {
  150.  *    Appearance Drawing Primitives
  151. }
  152. FUNCTION DrawThemePrimaryGroup({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
  153. FUNCTION DrawThemeSecondaryGroup({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
  154. FUNCTION DrawThemeSeparator({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
  155. FUNCTION DrawThemeWindowHeader({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
  156. FUNCTION DrawThemePlacard({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
  157. FUNCTION DrawThemeDialogFrame({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
  158. FUNCTION DrawThemeTextBoxFrame({CONST}VAR textBoxRect: Rect; isActive: BOOLEAN): OSStatus;
  159. FUNCTION DrawThemeTextBoxFocus({CONST}VAR textBoxRect: Rect; hasFocus: BOOLEAN): OSStatus;
  160. FUNCTION DrawThemeListBoxFrame({CONST}VAR listBoxRect: Rect; isActive: BOOLEAN): OSStatus;
  161. FUNCTION DrawThemeListBoxFocus({CONST}VAR listBoxRect: Rect; hasFocus: BOOLEAN): OSStatus;
  162. FUNCTION DrawThemeGenericFocus({CONST}VAR focusRect: Rect; hasFocus: BOOLEAN): OSStatus;
  163. {$ENDC}
  164. {$ALIGN RESET}
  165. {$POP}
  166.  
  167. {$SETC UsingIncludes := AppearanceIncludes}
  168.  
  169. {$ENDC} {__APPEARANCE__}
  170.  
  171. {$IFC NOT UsingIncludes}
  172.  END.
  173. {$ENDC}
  174.